home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript %>
- <HTML>
- <HEAD>
- <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
- <title>DameWare Components ASP Test</title>
- </head>
-
- <body>
-
- <%
-
- ' ************** DLGroup *****************
- Set DLGroup = Server.CreateObject("DameWare.DLGroupCtl.1")
- TestMachine = "\\mymachine"
- TestUser = "Administrator"
- TestGroup = "Administrators"
-
- %>
-
- <center>
- <br>
- <hr WIDTH="80%" COLOR="INDIGO">
- <font SIZE="6" FACE="Times New Roman" COLOR="INDIGO">DLGroup ASP Test</font>
- <hr WIDTH="80%" COLOR="INDIGO">
- </center>
-
- <TABLE Align=Center BORDER=0 WIDTH=600 BGColor=Gray Text=Indigo>
- <TR>
- <TD><B>Local Machine Name</B></TD>
- <TD><Input Type=text Disabled Name="Machine" SIZE=50 Value="<%= DLGroup.GetMachineName %>"></TD>
- </TR>
- <TR>
- <TD><B>ASP Running under User ID</B></TD>
- <TD><Input Type=text Disabled Name="USERID" SIZE=50 Value="<%= DLGroup.GetCurrentUserID %>"></TD>
- </TR>
- <TD><B>Testing for Machine Name</B></TD>
- <TD><Input Type=text Disabled Name="TMachine" SIZE=50 Value="<%= TestMachine %>"></TD>
- </TR>
- <TR>
- <TD><B>Testing for User ID</B></TD>
- <TD><Input Type=text Disabled Name="TUSERID" SIZE=50 Value="<%= TestUser %>"></TD>
- </TR>
- <TR>
- <TD><B>Testing for Group</B></TD>
- <TD><Input Type=text Disabled Name="TGROUP" SIZE=50 Value="<%= TestGroup %>"></TD>
- </TR>
- </table>
-
- <BR>
- <center>
- <hr WIDTH="80%" COLOR="INDIGO">
-
- <%
-
- DLGroup.Machine = TestMachine
- DLGroup.UserID = TestUser
- DLGroup.Group = TestGroup
- Response.Write "<STRONG>ISMEMBER test says: </STRONG>"
- Response.Write "[" & CStr(DLGroup.IsMember) & "]"
-
- If DLGroup.IsMember = False Then
- Response.Write DLGroup.UserID & " is NOT a member of group " & DLGroup.Group & " on " & DLGroup.Machine & "<BR><BR>"
- else
- Response.Write DLGroup.UserID & " is a member of group " & DLGroup.Group & " on " & DLGroup.Machine & "<BR><BR>"
- end if
-
- %>
-
- </center>
-
- <TABLE Align=Center BORDER=0 WIDTH=400 BGColor=Gray Text=Indigo>
- <TR>
- <TD><Input Type=text Disabled SIZE=40 Value="GROUP NAME"></TD>
- <TD><Input Type=text Disabled SIZE=40 Value="GROUP COMMENT"></TD>
- </TR>
-
- <%
-
- DLGroup.Machine = TestMachine
- DLGroup.Group = TestGroup
- DLGroup.Userid = TestUser
- DLGroup.SetFirstUserGroup
- i = 0
- While DLGroup.UserGroupGetNext <> 0
-
- %>
-
- <TR>
- <TD><Input Type=text Disabled SIZE=40 Value="<%= DLGroup.Group %>"></TD>
- <TD><Input Type=text Disabled SIZE=40 Value="<%= DLGroup.GroupComment %>"></TD>
- </TR>
-
- <%
-
- i = i + 1
- Wend
-
- %>
-
- </table>
-
- <%
-
- Set DLGroup = Nothing
-
- %>
-
- </body>
- </html>
-